package com.xhtech.base.data

import androidx.annotation.Keep
import com.blankj.utilcode.util.TimeUtils

import com.google.gson.annotations.SerializedName


/**
 * @author yuanxh
 * @date :2023/6/16 20:24
 * @description: 用户信息
 */
@Keep
class UserInfo() {
    @SerializedName("user_id")
    var userId: String = ""

    @SerializedName("nick_name")
    var nickName: String = ""

    //账户
    @SerializedName("account")
    var account: String = ""

    @SerializedName("head_pic")
    var headPic: String = ""

    //年龄
    @SerializedName("age")
    var age: Int = 0

    @Deprecated("陌生人相关逻辑废弃")
    @SerializedName("can_watch")
    var canWatch: Int = 0

    //魅力值
    @SerializedName("charm_num")
    var charmNum: Int = 0

    //地址
    @SerializedName("district")
    var district: String = ""

    //粉丝数量
    @SerializedName("fan_num")
    var fsNum: Int = 0

    //关注数量
    @SerializedName("focus_num")
    var gzNum: Int = 0

    //花朵道具Id
    @SerializedName("friend_prop_id")
    var friendPropId: Int = 0

    //被申请好友时，需要的花朵数量
    @SerializedName("friend_prop_num")
    var friendPropNum: Int = 0

    //性别 性别0男；1女
    @SerializedName("gender")
    var gender: String = ""

    //金币数量
    @SerializedName("gold_num")
    var goldNum: Int = 0

    //邀请码
    @SerializedName("invite_yq_code")
    var inviteYqCode: String = ""

    //是否填写过邀请码 0，1 无，有
    @SerializedName("isYqCode")
    var isYqCode: Int = 0

    //填写的邀请码
    @SerializedName("yqCode")
    var yqCode: String = ""

    //0未关注/1已关注
    @SerializedName("isFans")
    var isFans: Int = 0

    //0未点赞/1已点赞
    @SerializedName("isLike")
    var isLike: Int = 0

    //是否是会员：0不是会员；1是会员；2会员过期
    @SerializedName("is_member")
    var vipStatus: Int = 0


    @Deprecated("喜欢的数量，已废弃")
    @SerializedName("like_num")
    var likeNum: Int = 0

    //lv等级
    @SerializedName("lv_num")
    var lvNum: String = ""


    //美知号
    @SerializedName("meizhi_id")
    var meizhiId: String = ""

    @SerializedName("meizhi_code")
    var meizhiCode: String = ""


    @SerializedName("member_time")
    private var memberTime: String = ""


    fun getVipTimeEnd(): String {
        val timeLong = TimeUtils.string2Millis(memberTime)
        return TimeUtils.millis2String(timeLong, "yyyy-MM-dd")
    }

}